﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;

namespace MarketMS
{
    public partial class Form1 : CCWin.CCSkinMain
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void skinTextBox1_Paint(object sender, PaintEventArgs e)
        {

        }

        

        private void btnLogin_Click(object sender, EventArgs e)
        {
            string name = txtName.Text;
            string pass = txtPass.Text;
            AdminService ads = new AdminService();

            AdminInfo admin = ads.Login(name, pass);//登录
            if (admin == null)
            {
                MessageBox.Show("登录失败,用户名或者密码错误");
            }
            else
            {
                string msg = string.Format(@"登录成功,您的用户信息如下:
管理员编号:{0}
管理员名称:{1}
管理员角色:{2}
管理员状态:{3}",admin.AdminId,admin.AdminName,admin.AdminRole,admin.AdminStatus);
                MessageBox.Show(msg);
            }
        }
    }
}
